<!-- 试题单元列表 -->
<!DOCTYPE html>
<html>
  <head>
    <include file="./Public/html/_head.html"/>
    <style>
      #banji{
        display:none;
      }
    </style>
  </head>

  <body ontouchstart>
    <include file="./Public/html/_refresh.html"/>

    <header class='demos-header'>
      <h1 class="demos-title">选择班级</h1>
    </header>

    <div class="bd">
      <div class="weui_cells_title">请选择班级</div>
      <div class="weui_cells weui_cells_checkbox">
        <label class="weui_cell weui_check_label" for="s16">
          <div class="weui_cell_hd">
            <input type="checkbox" name="checkbox1" class="weui_check" id="s16" checked="checked">
            <i class="weui_icon_checked"></i>
            <div id="banji">all</div>
          </div>
          <div class="weui_cell_bd weui_cell_primary"> 
            <p>所有班级</p>
          </div>
          <div class="weui_cell_ft"></div>
        </label>
        <volist name="classList" id="classList" empty="没有班级信息">
          <label class="weui_cell weui_check_label" for="{$classList.id}">
            <div class="weui_cell_hd">
              <input type="checkbox" name="checkbox1" class="weui_check" id="{$classList.id}">
              <i class="weui_icon_checked"></i>
              <div id="banji">{$classList.class}</div>
            </div>
            <div class="weui_cell_bd weui_cell_primary">
              <p>{$classList.class}</p>
            </div>
            <div class="weui_cell_ft"></div>
          </label>
        </volist>
      </div>
    </div>
    <div class="weui_btn_area">
      <a class="weui_btn weui_btn_primary" href="javascript:" id="submit">确定</a>
    </div>
  </body>
</html>
<include file="./Public/html/_foot.html"/>
<include file="./Public/html/_refreshJs.html"/>
<script>
$('#submit').click(function(){
  var banji = '';
  $(":checked").each(function(){
    banji += $(this).siblings('#banji').html();
    banji += '_';
  });

  if(banji === '') {$.toptip('你还没有选择班级','warning');return false;}  
  window.location.href = 'markClass/class/'+banji;
});
</script>
